From: Platonides Date: Tue, 4 May 2010 16:39:04 +0000 (+0000) Subject: Reading a parser test file with no tests matching the regex was counted as a FAIL. X-Git-Tag: 1.31.0-rc.0~36945 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=32684227b404ef619bd5b50ff3fe306088c50847;p=lhc%2Fweb%2Fwiklou.git Reading a parser test file with no tests matching the regex was counted as a FAIL. --- diff --git a/maintenance/parserTests.inc b/maintenance/parserTests.inc index 69d03a80d6..0a3522f236 100644 --- a/maintenance/parserTests.inc +++ b/maintenance/parserTests.inc @@ -289,7 +289,7 @@ class ParserTest { function runTests($tests) { $ok = true; - foreach($tests as $i => $t) { + foreach($tests as $i => $t) { $result = $this->runTest($t['test'], $t['input'], $t['result'], $t['options'], $t['config']); $ok = $ok && $result; @@ -1592,10 +1592,10 @@ class TestFileIterator implements Iterator { if(fseek($this->fh, 0)) { wfDie( "Couldn't fseek to the start of '$filename'\n" ); } - $this->index = 0; + $this->index = -1; $this->lineNum = 0; $this->eof = false; - $this->readNextTest(); + $this->next(); return true; }